package com.yy.poly_.polyparameter_;

/**
 * chapter08  com.yy.poly_.polyparameter_
 * 2023-04-22 12:21
 *
 * @author yy yuyue
 * description : 不可描述
 * @date 2023/4/22 12:21
 */
public class Manager extends Employee{
    private double bonus;

    public Manager(String name, double salary, double bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
    public void manage(){
        System.out.println("经理 " + getName() + " is managing");
    }

    //重写获取年薪的方法

    @Override
    public double getAnnual() {
        return super.getAnnual() + bonus;
    }
}
